<template>
  <div class="common-empty">
    <div class="common-empty__wrapper">
      <image src="@/assets/icon/icon-empty.png" />
      <span>
        <slot name="label"> {{ label }} </slot>
      </span>
    </div>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: "common-empty",
});

withDefaults(
  defineProps<{
    label?: string;
  }>(),
  {
    label: "暂无数据",
  }
);
</script>

<style lang="less">
.common-empty {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  &__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    image {
      width: 160px;
      height: 153px;
    }
    span {
      font-weight: 400;
      font-size: 28px;
      color: #8b8b8b;
      line-height: 40px;
    }
  }
}
</style>
